package designer.single;

/**
 * 单例模式 非同步 饿汉模式
 * Created by tanlee on 2016/3/31.
 */
public class Singleton1 {

    /**
     * 饿汉式,一开始就调用基本的程序
     */
    private static Singleton1 singleton1 = new Singleton1();

    /**
     * 构造方法私有
     */
    private Singleton1() {

    }

    public static Singleton1 getInstance(){
        return singleton1;
    }

}
